<template>
	<view>
		<u-sticky bgColor="#6492FF" offsetTop=0 customNavHeight=0>
			<navbox title="佣金提升" btn='申请记录' @rightH="navto('/pages/my/yjsqlist')"></navbox>
		</u-sticky>
		<view class="con">
			<view class="con__item">
				<view class="con__item__title">
					升为金牌帐户
				</view>
				<view class="" style="padding: 34rpx 44rpx 0;line-height: 40rpx;">
					<view class="mb40 c3e3">
						金牌账户权益：
					</view>
					<view class="mb40 c707">
						1、本人项目佣金置顶
					</view>
					<view class="mb40 c707">
						2、上级不再抽佣
					</view>
					<view class="mb40 c707">
						3、每培养1名金牌账户，可获得该金牌账户提现
						金额{{info.customerTypeGoldBonus}}%的奖励
					</view>
					<view class="mb40 c707">
						4、培养3名金牌账户，可升级为团长账户
					</view>
					<view class="mb40 c707">
						5、金牌账户专属标识
					</view>
					<view class="mb40 c3e3">
						满足条件：
					</view>
					<view class="mb40 c707">
						1.推广天数≥{{info.customerTypeGoldDays}}天
					</view>
					<view class="mb40 c707">
						2.连续{{info.customerTypeGoldIncomeDays}}天日收入≥{{info.customerTypeGoldDayIncome}}元
					</view>
				</view>
				<view class="con__item__footer">
					<u-button @click="submit(1,'金牌账户')" text="立即申请" color="#6492FF" shape='circle'></u-button>
				</view>
			</view>
			<view class="con__item">
				<view class="con__item__title">
					升为团长账户
				</view>
				<view class="" style="padding: 34rpx 44rpx 0;line-height: 40rpx;">
					<view class="mb40 c3e3">
						团长账户权益:
					</view>
					<view class="mb40 c707">
						1、团队整体项目佣金置顶(佣金上浮3%~15%)
					</view>
					<view class="mb40 c707">
						2、变为公司直属
					</view>
					<view class="mb40 c707">
						3、每培养1名团长，可获得{{info.customerTypeGroupMoney}}元奖励
					</view>
					<view class="mb40 c707">
						4、培养10名团长账户，升级为合伙人
					</view>
					<view class="mb40 c707">
						5、团长账户专属标识
					</view>
					<view class="mb40 c707">
						6、可设置0-30%和100%的佣金抽成比例
					</view>
					<view class="mb40 c3e3">
						满足条件：
					</view>
					<view class="mb40 c707">
						1、直属下级≥{{info.customerTypeGroupChilds}}人
					</view>
					<view class="mb40 c707">
						2、下级金牌账户人数≥{{info.customerTypeGroupGoldChilds}}人
					</view>
				</view>
				<view class="con__item__footer">
					<u-button @click="submit(2,'团长账户')" text="立即申请" color="#6492FF" shape='circle'></u-button>
				</view>
			</view>
			<view class="con__item">
				<view class="con__item__title">
					升为合伙人
				</view>
				<view class="" style="padding: 34rpx 44rpx 0;line-height: 40rpx;">
					<view class="mb40 c3e3">
						合伙人权益:
					</view>
					<view class="mb40 c707">
						1、团长账号所有权益
					</view>
					<view class="mb40 c707">
						2、享受下属所有团队总利润的{{info.customerTypePartnerFactor}}%
					</view>
					<view class="mb40 c707">
						3、每培养1名合伙人，可获得{{info.customerTypePartnerMoney}}元奖励
					</view>
					<view class="mb40 c707">
						4、实现管道收益
					</view>
					<view class="mb40 c3e3">
						满足条件：
					</view>
					<view class="mb40 c707">
						1、培养团长人数≥{{info.customerTypePartnerChilds}}人 或 缴纳{{info.customerTypePartnerFee}}元保证金
					</view>

				</view>
				<view class="con__item__footer">
					<u-button @click="submit(3,'合伙人')" text="立即申请" color="#6492FF" shape='circle'></u-button>
				</view>
			</view>


		</view>
	</view>
</template>

<script>
	import {
		showUpInfo,
		upper
	} from '@/api/user.js'
	export default {
		data() {
			return {
				info: {}
			};
		},
		onLoad() {
			showUpInfo().then(res => {
				if (res.data.code == 200) {
					this.info = res.data.data
					// console.log(res.data.data)
				}
			})
		},
		methods: {
			submit(targetAccountType, title) {
				let _this = this
				uni.showModal({
					title: '是否升级为' + title,
					success(r) {
						if (r.confirm) {
							upper({
								targetAccountType
							}).then(res => {
								if (res.data.code == 200) {
									_this.$u.toast('提交成功')
								} else {
									_this.$u.toast(res.data.msg)
								}
							})
						}
					}
				})



			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f6f6f6;
	}

	.con {
		padding: 25rpx 16rpx;

		&__item {
			background: #FFFFFF;
			border-radius: 14rpx;
			font-family: Source Han Sans SC;
			font-weight: 400;
			font-size: 30rpx;
			line-height: 30rpx;
			margin-bottom: 25rpx;

			&__title {
				height: 70rpx;
				background: #6492FF;
				border-radius: 14rpx 14rpx 0rpx 0rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #F6F6F6;
			}

			&__fd {
				font-family: Source Han Sans SC;
				font-weight: 400;
				font-size: 30rpx;
				color: #3E3D3D;
				line-height: 30rpx;
			}

			&__footer {
				padding: 20rpx 100rpx 30rpx;

			}
		}
	}

	.c707 {
		color: #707070;
		padding-left: 2rem;
	}

	.mb40 {
		margin-bottom: 0;

	}

	.c3e3 {
		color: #3E3D3D;
		padding: 10rpx 0;
	}

	.u-button {
		height: 60rpx;
	}
</style>